package cn.doitedu.test;

import com.googlecode.aviator.AviatorEvaluator;
import com.googlecode.aviator.Expression;

import java.util.HashMap;

public class AviatorDemo {
    public static void main(String[] args) {


        Expression expression = AviatorEvaluator.compile("a>b? a : c ");

        HashMap<String, Object> data = new HashMap<>();
        data.put("a",20);
        data.put("b",30);
        data.put("c",40);


        Object result = expression.execute(data);
        System.out.println(result);

    }

}
